<?php

require_once dirname(__FILE__).'/../AIS_ObjectTypeCompatibilityValidatorError.php';

interface AIS_JsonPrcMethodParamsValidator {
	/**
	 * Function checks that the parameters sent by Json are in the form the Function called expects them.
	 * This may be quite slow for large non-primitive-Parameters. If a type of a parameter is a class
	 * that contains cyclic references, the function will always return false.
	 *
	 * @param ReflectionMethod $method The method we want to test the parameters against
	 * @param array $params This are the parameters sent over Json and decoded to an array
	 * @return bool True if the params in array have expected structure, false otherwise.
	 */
	public function validate(ReflectionMethod $method, $params);
	/**
	 * Returns the Error Object when something went wrong
	 *
	 * @return AIS_ObjectTypeCompatibilityValidatorError
	 */
	public function getErrorMessage();
}

?>